import { request } from "@/utils/request.js"

// 是否需要合并数据
export function getUserMergeDataApi() {
    return request({
        url: "/ht-user/userHonor/getUserMergeData",
        method: "GET",
    });
}


// 合并页面时间下拉菜单
export function getGrantingTimeList() {
    return request({
        url: "/ht-user/userHonor/getGrantingTimeList",
        method: "GET",
    });
}


// 合并页面单位下拉菜单
export function getGrantingUnitList() {
    return request({
        url: "/ht-user/userHonor/getGrantingUnitList",
        method: "GET",
    });
}


// 首页榜单
export function getListDataApi(type,counties) {
    return request({
        url: `/ht-nonrealtime-gameservice/hot/getHomePageHot?type=${type}&counties=${encodeURIComponent(counties)}`,
        method: "GET"
    });
}
// 用户合并数据提交
export function addUserMergeDataCheck(data) {
    return request({
        url: "/ht-user/userHonor/addUserMergeDataCheck",
        method: "POST",
        data: data
    });
}
// 热搜词汇
export function getTopSearch() {
    return request({
        url: "/ht-nonrealtime-gameservice/topSearch/getTopSearch",
        method: "POST"
    });
}
// 历史搜索词汇
export function getUserSearchHistoryList() {
    return request({
        url: "/ht-nonrealtime-gameservice/topSearch/getUserSearchHistoryList",
        method: "POST"
    });
}

/**
 * 获取首页活动数据
 * @returns {Promise<unknown>}
 */
export const getActivityDataApi = () => {
    return request({
        url: '/ht-nonrealtime-gameservice/eventsPage/getEventsPageList',
        method: 'POST'
    })
}

/**
 * 用户获取徽章
 * @returns {Promise<unknown>}
 */
export const userGetBadgeApi = () => {
    return request({
        url: '/ht-nonrealtime-gameservice/badge/userScanGetBadge',
        method:'GET'
    })
}

/**
 * 获取更多区域数据
 * @returns {Promise<unknown>}
 */
export const getMoreAreaDataApi = () => {
    return request({
        url: '/ht-nonrealtime-gameservice/configFields/getConfigEnterpriseFields?type=0',
        method:'GET'
    })
}

/**
 * 监测用户是否绑定手机号
 * @returns {*}
 */
export const checkUserHasPhoneApi = () => {
    return request({
        url:'/ht-user/user/checkIsExistPhone',
        method: 'GET'
    })
}
/**
 * 活动弹窗提醒内容
 * @returns {*}
 */
export const getActivityPopupApi = () => {
    return request({
        url:'/ht-nonrealtime-gameservice/activity/getActivityPopup',
        method: 'GET'
    })
}
/**
 * 活动弹窗提醒内容
 * @returns {*}
 */
export const isShowActivityPopupApi = () => {
    return request({
        url:'/ht-nonrealtime-gameservice/activity/isShowActivityPopup',
        method: 'GET'
    })
}



/**
 * 分类导航
 * @returns {*}
 */
export const getButtonList = () => {
    return request({
        url:'/ht-nonrealtime-gameservice/home/button/getButtonList',
        method: 'GET'
    })
}
